﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace TiDiSun
{
    public partial class FrmCaphatCS : Form
    {
        public static string[] _arrNewData;

        public FrmCaphatCS()
        {
            InitializeComponent();
        }

        private void FrmCaphatCS_Load(object sender, EventArgs e)
        {
            DataGridViewRow row = (DataGridViewRow)this.Tag;
            txtTenSP.Text = row.Cells[0].Value.ToString();
            txtCS.Text = row.Cells[1].Value.ToString();
            txtThoiGian.Text = row.Cells[2].Value.ToString();
            txtSoLuong.Text = row.Cells[3].Value.ToString();
            txtCSHaoHut.Text = row.Cells[4].Value.ToString();
        }

        private void BtnCapnhat_Click(object sender, EventArgs e)
        {
            Form1.flag_CapNhat = true;
            _arrNewData = new string[] {txtTenSP.Text, txtCS.Text, txtThoiGian.Text, txtSoLuong.Text, txtCSHaoHut.Text};
            this.Close();
        }

        private void btnHuy_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}
